package com.example.day16.ex02;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapDemo02 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("name","zhangsan");
        map.put("age","18");
        map.put("sex","man");
        Set<Map.Entry<String,String>>entrySet=map.entrySet();
        for (Map.Entry<String,String> me : entrySet) {
            String key=me.getKey();
            String value=me.getValue();
            System.out.println(key+"="+value);
        }
    }
}
